zThrown work#733
Conversation
|
| Section | From | To | Bytes | |
|---|---|---|---|---|
| ✅ | .bss |
0.00% | 100.00% | +13440 |
| 📈 | .data |
0.00% | 82.74% | +834 |
| 📈 | .rodata |
0.00% | 95.08% | +410 |
| ✅ | .sdata2 |
26.92% | 100.00% | +64 |
| 📈 | .text |
10.93% | 94.22% | +9714 |
| Function | From | To | Bytes | |
|---|---|---|---|---|
| 📈 | zThrown_Setup(zScene*) |
19.19% | 89.30% | +302 |
| 📈 | zFruit_ColorFade(zThrownStruct*) |
0.00% | 97.31% | +140 |
| 📈 | zFruit_Update(xEnt*, xScene*, float) |
0.00% | 97.85% | +755 |
| 📈 | zThrown_Update(xEnt*, xScene*, float) |
0.00% | 88.51% | +3349 |
| ✅ | xBBox::operator=(const xBBox&) |
0.00% | 100.00% | +76 |
| ✅ | zThrown_Reset() |
0.00% | 100.00% | +168 |
| 📈 | zThrown_LaunchVel(xEnt*, xVec3*) |
0.00% | 91.93% | +389 |
| 📈 | zThrown_LaunchDir(xEnt*, xVec3*) |
0.00% | 99.98% | +175 |
| 📈 | zThrown_LaunchPos(xEnt*, xVec3*, xVec3*) |
0.00% | 94.20% | +471 |
| 📈 | zThrown_LaunchStack(xEnt*, xEnt*) |
0.00% | 95.41% | +343 |
| 📈 | zThrown_AddFruit(xEnt*) |
0.00% | 90.04% | +388 |
| 📈 | zThrown_Remove(xEnt*) |
14.14% | 99.95% | +370 |
| 📈 | zThrownCollide_CauseDamage(zThrownStruct*, xEntCollis*) |
0.00% | 92.12% | +512 |
| 📈 | zThrownCollide_ThrowFruit(zThrownStruct*, xEntCollis*, float*, float*) |
0.00% | 99.55% | +967 |
| 📈 | zThrownCollide_StoneTiki(zThrownStruct*, xEntCollis*, float*, float*) |
0.00% | 99.44% | +350 |
| ✅ | zThrown_IsFruit(xEnt*, float*) |
75.67% | 100.00% | +29 |
| ✅ | zThrown_ButtonIteratorCB(xBase*, zScene*, void*) |
0.00% | 100.00% | +92 |
| ✅ | zThrownStruct::operator=(const zThrownStruct&) |
0.00% | 100.00% | +216 |
| ✅ | xEntFrame::operator=(const xEntFrame&) |
0.00% | 100.00% | +272 |
| ✅ | xEntDrive::operator=(const xEntDrive&) |
0.00% | 100.00% | +244 |
| ✅ | xEntDrive::tri_data::operator=(const xEntDrive::tri_data&) |
0.00% | 100.00% | +100 |
|
Decided to reopen this |
|
| Section | From | To | Bytes | |
|---|---|---|---|---|
| ✅ | .bss |
0.00% | 100.00% | +13440 |
| 📈 | .data |
0.00% | 82.74% | +834 |
| 📈 | .rodata |
0.00% | 95.08% | +410 |
| ✅ | .sdata2 |
26.92% | 100.00% | +64 |
| 📈 | .text |
10.93% | 94.22% | +9714 |
| Function | From | To | Bytes | |
|---|---|---|---|---|
| 📈 | zThrown_Setup(zScene*) |
19.19% | 89.30% | +302 |
| 📈 | zFruit_ColorFade(zThrownStruct*) |
0.00% | 97.31% | +140 |
| 📈 | zFruit_Update(xEnt*, xScene*, float) |
0.00% | 97.85% | +755 |
| 📈 | zThrown_Update(xEnt*, xScene*, float) |
0.00% | 88.51% | +3349 |
| ✅ | xBBox::operator=(const xBBox&) |
0.00% | 100.00% | +76 |
| ✅ | zThrown_Reset() |
0.00% | 100.00% | +168 |
| 📈 | zThrown_LaunchVel(xEnt*, xVec3*) |
0.00% | 91.93% | +389 |
| 📈 | zThrown_LaunchDir(xEnt*, xVec3*) |
0.00% | 99.98% | +175 |
| 📈 | zThrown_LaunchPos(xEnt*, xVec3*, xVec3*) |
0.00% | 94.20% | +471 |
| 📈 | zThrown_LaunchStack(xEnt*, xEnt*) |
0.00% | 95.41% | +343 |
| 📈 | zThrown_AddFruit(xEnt*) |
0.00% | 90.04% | +388 |
| 📈 | zThrown_Remove(xEnt*) |
14.14% | 99.95% | +370 |
| 📈 | zThrownCollide_CauseDamage(zThrownStruct*, xEntCollis*) |
0.00% | 92.12% | +512 |
| 📈 | zThrownCollide_ThrowFruit(zThrownStruct*, xEntCollis*, float*, float*) |
0.00% | 99.55% | +967 |
| 📈 | zThrownCollide_StoneTiki(zThrownStruct*, xEntCollis*, float*, float*) |
0.00% | 99.44% | +350 |
| ✅ | zThrown_IsFruit(xEnt*, float*) |
75.67% | 100.00% | +29 |
| ✅ | zThrown_ButtonIteratorCB(xBase*, zScene*, void*) |
0.00% | 100.00% | +92 |
| ✅ | zThrownStruct::operator=(const zThrownStruct&) |
0.00% | 100.00% | +216 |
| ✅ | xEntFrame::operator=(const xEntFrame&) |
0.00% | 100.00% | +272 |
| ✅ | xEntDrive::operator=(const xEntDrive&) |
0.00% | 100.00% | +244 |
| ✅ | xEntDrive::tri_data::operator=(const xEntDrive::tri_data&) |
0.00% | 100.00% | +100 |
main/dolphin/src/os/init/__start
| Section | From | To | Bytes | |
|---|---|---|---|---|
| ✅ | .text |
100.00% | 100.00% | +/-0 |
| Function | From | To | Bytes | |
|---|---|---|---|---|
| ✅ | __check_pad3 |
0.00% | 100.00% | +64 |
| ✅ | __set_debug_bba |
0.00% | 100.00% | +12 |
| ✅ | __get_debug_bba |
0.00% | 100.00% | +8 |
| ✅ | __start |
0.00% | 100.00% | +348 |
| ✅ | __init_registers |
0.00% | 100.00% | +144 |
| ✅ | __init_data |
0.00% | 100.00% | +192 |
main/dolphin/src/os/init/__ppc_eabi_init
| Section | From | To | Bytes | |
|---|---|---|---|---|
| ✅ | .text |
100.00% | 100.00% | +/-0 |
| Function | From | To | Bytes | |
|---|---|---|---|---|
| ✅ | __init_hardware |
0.00% | 100.00% | +36 |
| ✅ | __flush_cache |
0.00% | 100.00% | +52 |
main/debugger/embedded/MetroTRK/Portable/serpoll
| Section | From | To | Bytes | |
|---|---|---|---|---|
| ✅ | .bss |
83.33% | 100.00% | +3 |
| Function | From | To | Bytes |
|---|
main/Runtime/__mem
| Section | From | To | Bytes |
|---|
| Function | From | To | Bytes | |
|---|---|---|---|---|
| ✅ | memset |
0.00% | 100.00% | +48 |
| ✅ | __fill_mem |
0.00% | 100.00% | +184 |
| ✅ | memcpy |
0.00% | 100.00% | +80 |
main/debugger/embedded/MetroTRK/Portable/mem_TRK
| Section | From | To | Bytes | |
|---|---|---|---|---|
| ✅ | .text |
100.00% | 100.00% | +/-0 |
| Function | From | To | Bytes | |
|---|---|---|---|---|
| ✅ | TRK_memset |
0.00% | 100.00% | +48 |
| ✅ | TRK_memcpy |
0.00% | 100.00% | +36 |
main/debugger/embedded/MetroTRK/Processor/ppc/Generic/targimpl
| Section | From | To | Bytes | |
|---|---|---|---|---|
| ✅ | .bss |
99.86% | 100.00% | +2 |
| Function | From | To | Bytes |
|---|
main/debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk
| Section | From | To | Bytes | |
|---|---|---|---|---|
| ️ |
.text |
85.35% | 51.14% | --217 |
| Function | From | To | Bytes | |
|---|---|---|---|---|
| 📈 | __TRK_reset |
0.00% | 10.84% | +31 |
main/debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk_glue
| Section | From | To | Bytes | |
|---|---|---|---|---|
| ✅ | .bss |
99.82% | 100.00% | +16 |
| Function | From | To | Bytes |
|---|
SquareMan
left a comment
There was a problem hiding this comment.
What was your AI use here? It looks to me like at least some of the functions are AI generated so I'd just like to know if it's only some of them or if it's entirely AI for my own understanding of the AI's abilities here.
| xEntFrame& operator=(const xEntFrame& rhs) | ||
| { | ||
| mat = rhs.mat; | ||
| oldmat = rhs.oldmat; | ||
| *(S32*)(&oldvel.x) = *(S32*)(&rhs.oldvel.x); | ||
| *(S32*)(&oldvel.y) = *(S32*)(&rhs.oldvel.y); | ||
| *(S32*)(&oldvel.z) = *(S32*)(&rhs.oldvel.z); |
There was a problem hiding this comment.
I think this is probably a compiler generated assignment function. That's the only way I know to get it to copy floats via the regular registers. Do things work ok if you delete this function?
| tri_data& operator=(const tri_data& rhs) | ||
| { | ||
| xCollis::tri_data::operator=(rhs); | ||
| *(S32*)(&loc.x) = *(S32*)(&rhs.loc.x); | ||
| *(S32*)(&loc.y) = *(S32*)(&rhs.loc.y); | ||
| *(S32*)(&loc.z) = *(S32*)(&rhs.loc.z); |
| xEntDrive& operator=(const xEntDrive& rhs) | ||
| { | ||
| flags = rhs.flags; | ||
| otm = rhs.otm; | ||
| otmr = rhs.otmr; | ||
| os = rhs.os; | ||
| tm = rhs.tm; | ||
| tmr = rhs.tmr; | ||
| s = rhs.s; | ||
| odriver = rhs.odriver; | ||
| driver = rhs.driver; | ||
| driven = rhs.driven; | ||
| *(S32*)(&op.x) = *(S32*)(&rhs.op.x); | ||
| *(S32*)(&op.y) = *(S32*)(&rhs.op.y); |
| xBBox& operator=(const xBBox& rhs) | ||
| { | ||
| *(S32*)(¢er.x) = *(S32*)(&rhs.center.x); | ||
| *(S32*)(¢er.y) = *(S32*)(&rhs.center.y); |
| zThrownStruct& operator=(const zThrownStruct& rhs) | ||
| { | ||
| ent = rhs.ent; | ||
| stackEnt = rhs.stackEnt; | ||
| stackTgt = rhs.stackTgt; | ||
| patLauncher = rhs.patLauncher; | ||
| oldupdate = rhs.oldupdate; | ||
| *(S32*)(&vel.x) = *(S32*)(&rhs.vel.x); |
| if (((xEnt*)sc->base[i])->baseType == eBaseTypeStatic || | ||
| ((xEnt*)sc->base[i])->baseType == eBaseTypeDestructObj) |
There was a problem hiding this comment.
going off memory here so ignore me if I'm wrong but isn't baseType accessible from the base type without casting here?
| // Call shrapnel init if exists | ||
| { | ||
| zShrapnelAsset* shrap = thrown->stats->shrapAsset; | ||
| if (shrap != NULL && shrap->initCB != NULL) | ||
| { | ||
| shrap->initCB(shrap, ent->model, NULL, NULL); | ||
| } | ||
| } |
There was a problem hiding this comment.
is there a need for this extra outer scope here?
| // Set up temp collision struct | ||
| xEntCollis collis; | ||
| collis.chk = 0x2E; | ||
| collis.pen = 0x2E; |
There was a problem hiding this comment.
Is this function AI generated? Comments like this are super weird. Anyways, I think these are supposed to use the collision type flag macros in xEnt.h. 0x2E would be XENT_COLLTYPE_ENV | XENT_COLLTYPE_NPC | XENT_COLLTYPE_DYN | XENT_COLLTYPE_STAT.
|
|
||
| switch (stackTgt->bound.type) | ||
| { | ||
| case 1: // sphere |
There was a problem hiding this comment.
There are XBOUND_TYPE macros in xBound.h for these cases
| // Clear thrown flag from baseFlags | ||
| ent->baseFlags &= (U16)~0x80; | ||
|
|
||
| // Clear frame if it was our temp frame | ||
| if (thrown->ent->frame == &thrown->frame) | ||
| { | ||
| thrown->ent->frame = NULL; | ||
| } | ||
|
|
||
| // Zero out model color multipliers | ||
| xModelInstance* mod = thrown->ent->model; | ||
| mod->RedMultiplier = mod->GreenMultiplier = mod->BlueMultiplier = 0.0f; |
There was a problem hiding this comment.
More super unnecessary comments in this function after this one. Makes me question if potentially useful comments like this one are accurate. However of course the correct action is to use a bitflag macro value here instead of a literal int but I'm not sure if baseFlags has any defined yet.
No description provided.